<template>
    <div>
        nihao 
         <backHeader></backHeader>
         <form action="" @submit.prevent="login">
             <input type="text" autocomplete="off"
 name="username" placeholder="请输入账号">
					<input type="password" autocomplete="off"
 name="password" placeholder="请输入密码">
            <button>登录</button>
         </form>

    </div>
   
</template>
<script>
    import backHeader from "../components/backHeader"
    export default {
        components:{
            backHeader
        },
        methods:{
            login(){
                this.axios.post('http://www.vue-js.com/accesstoken',{
                     accesstoken:this.access
                })
               
                 .then(data => {
                        console.log(data.data.data)
                        this.error = false
                        
                        // console.log(this)
                    })
                    .catch(err => {

                    })
        }
            
        }
    //     $('form').submit(function(e){
	// 	e.preventDefault()
	// 	var data = $('form').serialize()
	// 	this.axios.post('http://www.vue-js.com/signin',data)
	// 		.done(function(data){
	// 			if(data.code == 'success'){
	// 				console.log('111')
	// 				location.href = 'index.html'
	// 			}else{
	// 				$('.login-input-div').css({'display':'block','color':'red'})
	// 				.text(data.message)
	// 			}
	// 		})
	// 		.fail(function(err){
	// 			console.log(err)
	// 		})
			
			
	// })
    }
</script